
const user = {
  state: {
    lang: '',
    menus: [],
    token:"",
  },

  mutations: {
    SET_LANG: (state, lang) => {
      state.lang = lang
    },
    SET_MENUS: (state, menus) => {
      state.menus = menus
    },
    SET_TOKEN: (state, token) => {
      state.token = token
    },
  },

  actions: {
    //语言
    lang({ commit }, lang) {
      commit('SET_LANG', lang)

    },
    //菜单
    menus({ commit }, menus) {
      commit('SET_MENUS', menus)
    },
    token({ commit }, token) {
      commit('SET_TOKEN', token)
    },
    
  }
}

export default user
